From: Robert Lipe Date: Mon, 22 Aug 2016 17:08:49 +0000 (-0500) Subject: Martin Egge says that Compegps prefers replacing spaces in names X-Git-Tag: archive/raspbian/1.10.0+ds-2+rpi1~1^2~12^2~9^2~17 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=5fc1b824c406023af68194e60be3d2a46289411e;p=gpsbabel.git Martin Egge says that Compegps prefers replacing spaces in names with underscores instead of deleting them. Done. --- diff --git a/compegps.cc b/compegps.cc index d7422131e..121bc8e0e 100644 --- a/compegps.cc +++ b/compegps.cc @@ -484,7 +484,12 @@ write_waypt_cb(const Waypoint* wpt) if (curr_index != target_index) { return; } - name = (snlen > 0) ? mkshort_from_wpt(sh, wpt) : csv_stringclean(wpt->shortname, " "); + + // Our only output cleansing is to replace + QString cleaned_name(wpt->shortname); + cleaned_name.replace(' ', '_'); + + name = (snlen > 0) ? mkshort(sh, cleaned_name) : cleaned_name; gbfprintf(fout, "W %s A ", CSTR(name)); gbfprintf(fout, "%.10f%c%c ",